﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ScoreExchangePoint.aspx.cs" Inherits="Users_ScoreExchangePoint" %>
<%@ Register assembly="DotNetTextBox" namespace="DotNetTextBox" tagprefix="DNTB" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <asp:PlaceHolder Visible="false" runat="server">
         <script src="../Script/jquery-1.3.2-vsdoc2.js" type="text/javascript"></script>
    </asp:PlaceHolder>
    <%=this.UI_Head(Base_CurrPath, "", "")%>
    <link rel="stylesheet" type="text/css" href="../Css/Users.css" />
    <link href="../Script/formValidator/style/validator.css" rel="stylesheet" type="text/css" />
    <script src="../Script/formValidator/jquery_last.js" type="text/javascript"></script>
    <script src="../Script/formValidator/formValidator.js" type="text/javascript"></script>
    <script src="../Script/formValidator/formValidatorRegex.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
        $.formValidator.initConfig({ alertmessage: false, formid: "HappyPet_Form", onerror: function(msg) { alert(msg) } });
        //$("#txtScore").formValidator({ tipid: "txtTipScore", onshow: "请输入兑换的积分", onfocus: "兑换的积分不能为空", oncorrect: "输入正确" }).inputValidator({ empty: { leftempty: false, rightempty: false, emptyerror: "兑换的积分两边不能有空符号" }, onerror: "兑换的积分不能为空,请确认" });
        $("#txtScore").formValidator({ tipid: "txtTipScore", onshow: "请输入正数", oncorrect: "输入正确" }).regexValidator({ regexp: "intege1", datatype: "enum", onerror: "正数格式不正确" });
    });
        
        function checkData()
        {
            var score=$("#txtScore").val();
            if(isNaN(parseInt(score)))
            {
                alert('请输入数字!');
                return false;
            }
            if(parseInt(score)>parseInt("<%=Point %>"))
            {
                alert('兑换积分不能超过总积分!');
                return false;
            }
            if(parseInt(score)%parseInt("<%=configInfo.PointChangeIntegral %>")!=0)
            {
                alert('输入的积分必须是<%=configInfo.PointChangeIntegral %>的整数倍!');
                return false;
            }
            return true;
        }
    </script>
</head>
<body>
<form id="HappyPet_Form" runat="server">
    <%=this.UI_TopControl()%>
    <div class="topbanner bodyList">
        <div class="body_995">
            <div class="Member_left">
                <%=this.UI_Users_loginOK()%>
                <%=this.UI_UsersDhtList() %>
            </div>
            <div class="Member_Right">
                <div class="Member_right_dht">
                    <img src="../Images/class_hy.jpg" /></div>
                <div class="Member_right_CntLIst">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align=center>

  <tr>
	<td height="25" align="center" bgcolor="#E3DEBE" class="title">兑换积分</TD>
    </tr>
    <tr align="center" class="tdbg" > 
      <td height="40">
                <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF">
                        
                        <tr>
                            <td colspan="2">
                                您的拥有的积分:<%=Point %> &nbsp;&nbsp;&nbsp;&nbsp;<%=configInfo.PointChangeIntegral%>积分可以兑换1点
                            </td>
                        </tr>
               
                        <tr>
            <td width="18%" align="center" style="padding:4px;" ><strong>请输入要兑换的积分:		</strong></td>
            <td width="82%" align="left" style="padding:4px;"class="tdIndiv"  ><div><asp:TextBox ID="txtScore"  MaxLength="30"
                    runat="server" Width="162px"></asp:TextBox></div> <div  id="txtTipScore" ></div></td></tr>
             
                    <tr>
                        <td align="center" style="padding:4px;" width="18%">
                            &nbsp;</td>
                        <td align="left" style="padding:4px;" width="82%">
                            <asp:Button ID="btnCreate" runat="server" Text="立即兑换" 
                               OnClientClick="return checkData();"  onclick="btnCreate_Click" />
                        </td>
                    </tr>

              
                </table>
            
            
                    
                    
                </td>
                    </tr>
    </table>   
           
           
           
           
                    
                </div>
            </div>
        </div>
        <br />
    </div>
    <%#Eval("MuId") %>
    
    <!-- 弹出层 -->
    <div id="divPop" style="position: absolute; display:none;
        width: 107px; height: 145px;">
        <div style="text-align: center;">
            <img src="../images/nopic.jpg"  id="ThumbImg" onload="javascript:DrawImage(this,107,145);" />
        </div>
    </div>
    
     <!-- 弹出层 -->
    <div id="divPopTwo" style="position: absolute; display:none;
        width: 107px; height: 145px;">
        <div style="text-align: center;">
            <img src="../images/nopic.jpg"  id="ThumbImgTwo" onload="javascript:DrawImage(this,107,145);" />
        </div>
    </div>
    
    
</form>   
</body>
</html>

